import random
from math import pi

inp = random.randrange(1,10)

if inp < pi:
    c = inp*2*pi
    s = pow(inp,2)*pi
    print("随机值小于pi时，随机值为：{}，周长为：{:.1f}，面积为：{:.1f}".format(inp,c,s))
else:
    cc = inp*pi
    ss =pow((inp/2),2)*pi
    print("随机值大于pi时，随机值为：{}，周长为：{:.1f}，面积为：{:.1f}".format(inp,cc,ss))
